Working with the Prizm Platform Services > API Reference > PCC RESTful API > Work Files |
Creates a new WorkFile.
A WorkFile can be any file, including a PDF document, XML document or PNG image. The purpose of a WorkFile is for temporary storage of files so they can be shared by various PCC Services that need to act on it. A WorkFile can be a file you provide as input to a process or a file provided to you as output from a process.
A WorkFile should not be used for archival storage. By default, WorkFile objects will be automatically deleted 24 hours after they are created.
Http Method
POST
Parameters
Name | Description | Details |
FileExtension |
File extension of the WorkFile. This extension must not include the leading period. Extensions are case-insensitive. |
string, required Example: pdf |
MinSecondsAvailable |
The minimum number of seconds which this WorkFile must remain available. If not provided, a configurable default value is used. This value is ignored if it is shorter than the configurable value. |
integer, optional Example: 60 |
Request Body
The binary file data.
Response Body
If successful, this method returns JSON containing the following properties:
Name | Description | Details |
fileId |
The ID of the newly created WorkFile. This ID can be used in other requests that accept a WorkFile ID as input. |
string, required Example: CVBuD7DbQYNoJDqByGierQ |
Status Codes
Examples
Example Request |
Copy Code
|
---|---|
GET http://localhost:18681/PCCIS/V1/WorkFile?FileExtension=pdf
Content-Type: application/octet-stream
[binary file data]
|
Example Response |
Copy Code
|
---|---|
200 OK
Content-Type: application/json
{
"fileId": workFileId
}
|
Gets the data associated with an existing WorkFile.
Http Method
GET
Parameters
Name | Description | Details |
WorkFileId |
ID of the WorkFile to retrieve |
string, required Example: CVBuD7DbQYNoJDqByGierQ |
ContentDispositionFilename |
Name to use in the Content-Disposition response header. The default value is "file-{WorkFileId}". The file extension given when the WorkFile was created will automatically be added to the Content-Disposition filename. |
string, optional Example: MonthlySalesReport |
Request Body
None
Response Body
The binary file data.
Status Codes
Examples
Example Request |
Copy Code
|
---|---|
GET http://localhost:18681/PCCIS/V1/WorkFile/CVBuD7DbQYNoJDqByGierQ?ContentDispositionFilename=MontlySalesReport
|
Example Response |
Copy Code
|
---|---|
200 OK Content-Type: application/octet-stream Content-Disposition: attachment; filename=MonthlySalesReport.pdf [binary file data] |